<template>
  <div class="select2-box">
    <select class="form-control select2" :name="name" :multiple="multiple">
      <slot></slot>
    </select>
  </div>
</template>

<script>
  export default {
    props: {
      name: {
        type: String,
        default: "select[]"
      },
      multiple: {
        default: false,
      }
    },
    mounted: function () {
      $(".select2").select2({
        tags: true
      });
    }
  }
</script>